Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for backward compatible API Client behavior #11567

Merged

Conversation

smallinsky
Copy link
Contributor

@smallinsky smallinsky commented Mar 30, 2022

What

Add support for backward-compatible behavior in the case where tsh profile was generated by tsh version without CAS fix where trusted clusters CAs were split and moved to cas directory.

This case occurs when a client uses an old tsh client without CAS fix and a news version of teleport plugins that try to load clusters certs from CAS directory in case of creating auth client from the tsh users profile.

@smallinsky smallinsky force-pushed the smallinsky/cas_legacy_tsh_auth_client_compatibility branch from 5b746bc to 3329184 Compare March 30, 2022 15:14
@smallinsky smallinsky marked this pull request as ready for review March 30, 2022 15:21
@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Mar 30, 2022
// TLSCAsPath returns the path to the users's TLS CA's certificates
// for the given proxy.
// <baseDir>/keys/<proxy>/certs.pem
// DELETE IN 10.0. Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this needs to be removed in 10.0 shouldn't we just fix it in 9.0? Technically this code will be deprecated the moment when is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is not stricte related to any teleport tsh or tctl flow but occurs in external tools that depends on teleport/api/clientpackage like [terraform](https://github.com/gravitational/teleport-plugins/blob/master/go.mod#L20) teleport-plugin where client still uses oldtshthat generates certs.pem dir but the teleport-plugin uses a news version ofteleport/api/client` that doesn't read certs from certs.pem.

If we will be sure that all clients switched to teleport v9 where trusted certs are stored in CAS directory we will be able to drop support for certs.pem file.

api/profile/profile.go Show resolved Hide resolved
api/profile/profile.go Outdated Show resolved Hide resolved
@smallinsky smallinsky merged commit dc09f6f into master Apr 1, 2022
@smallinsky smallinsky deleted the smallinsky/cas_legacy_tsh_auth_client_compatibility branch April 1, 2022 12:38
@webvictim webvictim mentioned this pull request Apr 19, 2022
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants